/*
 * @Author: HeAo
 * @Date: 2021-09-26 16:35:26
 * @LastEditTime: 2021-09-26 16:39:47
 * @LastEditors: HeAo
 * @Description:
 * @FilePath: \web2103-2105\web2105\3-1-ES6\day02\8-拓展运算符.js
 * 别乱动！
 */
// ...拓展运算符
// ...用在=左边，聚合作用，返回值类型，取决于外部包裹的数据类型
// ...用在=右边，剥离（展开）作用
let [a, ...b] = [1, 2, 3, 4, 5]

let obj1 = {
  name: 'tom',
  age: 20
}
let obj2 = {
  ...obj1,
  gender: 'male',
  age: 18
}
console.log(obj2);
